package com.github.pig.admin.model.zhgl.houseowner;

import java.util.Date;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.pig.common.util.UserUtils;

import java.io.Serializable;

/**
 * <p>
 * 业主基本信息表
 * </p>
 *
 * @author lxm
 * @since 2018-06-20
 */
@TableName("house_owner")
public class HouseOwner extends Model<HouseOwner> {

    private static final long serialVersionUID = 1L;
    public static String[] heads = {"姓名","性别","手机号","身份证号","楼宇名称","单元名称","房屋名称","家庭住址","角色标识"};

    @TableId(value = "id",type = IdType.UUID)
    private String id;
    /**
     * 姓名
     */
    @Excel(name = "姓名" ,width = 20)
    private String name;
    /**
     * 手机号
     */
    @Excel(name = "手机号" ,width = 20)
    private String phone;
    /**
     * 性别
     */
    @Excel(name = "性别" ,width = 20)
    private String sex;

    @TableField(exist = false)
    private String sexName;
    /**
     * 身份证号
     */
    @TableField("card_number")
    @Excel(name = "身份证号" ,width = 20)
    private String cardNumber;
    @TableField(exist = false)
    private String cardNumberNone;
    /**
     * 文件路径
     */
    @TableField("file_path")
    private String filePath;
    /**
     * 家庭住址
     */
    @Excel(name = "户籍所在地" ,width = 30)
    private String address;
    @TableField("user_id")
    private int userId;
    /**
     * 所属小区
     */
    @TableField("lease_date_start")
    private Date leaseDateStart;
    @TableField("default_house")
    private String defaultHouse;
    @TableField(exist = false)
    @Excel(name = "单元名称" ,width = 20)
    private String unitName;
    @TableField(exist = false)
    @Excel(name = "房屋名称" ,width = 20)
    private String houseName;
    @TableField(exist = false)
    @Excel(name = "楼宇名称" ,width = 20)
    private String buildingName;
    @TableField(exist = false)
    private String communityName;
    @TableField(exist = false)
    private String communityId;
    @TableField(exist = false)
    private String buildingId;
    @TableField(exist = false)
    private String unitId;
    /**
     * 所属房屋
     */
    @TableField("house_id")
    private String houseId;
    /**
     * 删除标志
     */
    @TableField("del_flag")
    private String delFlag;
    /**
     * 个人照片
     */
    @TableField("img_path")
    private String imgPath;
    /**
     * 与业主关系
     */
    private String relation;
    @TableField(exist = false)
    private String relationName;
    @TableField("lease_date_end")
    private Date leaseDateEnd;
    /**
     * 租户数
     */
    @TableField("lease_person_number")
    private Integer leasePersonNumber;

    @TableField("role_id")
    @Excel(name = "角色标识" ,width = 20)
    private String roleId;

    public String getRoleId() {
        return roleId;
    }

    @TableField("role_name")
    private String roleName;
    @TableField("invite_user")
    private String inviteUser;
    @TableField("invite_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    private Date inviteDate;
    @TableField("delete_invite_user")
    private String deleteInviteUser;
    @TableField("delete_invite_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    private Date deleteInviteDate;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public String getCardNumberNone() {
        return UserUtils.idEncrypt(cardNumber);
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getLeaseDateStart() {
        return leaseDateStart;
    }

    public void setLeaseDateStart(Date leaseDateStart) {
        this.leaseDateStart = leaseDateStart;
    }

    public String getHouseId() {
        return houseId;
    }

    public void setHouseId(String houseId) {
        this.houseId = houseId;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public String getRelation() {
        return relation;
    }

    public void setRelation(String relation) {
        this.relation = relation;
    }

    public Date getLeaseDateEnd() {
        return leaseDateEnd;
    }

    public void setLeaseDateEnd(Date leaseDateEnd) {
        this.leaseDateEnd = leaseDateEnd;
    }

    public Integer getLeasePersonNumber() {
        return leasePersonNumber;
    }

    public void setLeasePersonNumber(Integer leasePersonNumber) {
        this.leasePersonNumber = leasePersonNumber;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getHouseName() {
        return houseName;
    }

    public void setHouseName(String houseName) {
        this.houseName = houseName;
    }

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getCommunityId() {
        return communityId;
    }

    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }

    public String getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(String buildingId) {
        this.buildingId = buildingId;
    }

    public String getUnitId() {
        return unitId;
    }

    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public String getSexName() {
        return sexName;
    }

    public void setSexName(String sexName) {
        this.sexName = sexName;
    }

    public String getRelationName() {
        return relationName;
    }

    public void setRelationName(String relationName) {
        this.relationName = relationName;
    }

    public String getDefaultHouse() {
        return defaultHouse;
    }

    public void setDefaultHouse(String defaultHouse) {
        this.defaultHouse = defaultHouse;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getInviteUser() {
        return inviteUser;
    }

    public void setInviteUser(String inviteUser) {
        this.inviteUser = inviteUser;
    }

    public Date getInviteDate() {
        return inviteDate;
    }

    public void setInviteDate(Date inviteDate) {
        this.inviteDate = inviteDate;
    }

    public String getDeleteInviteUser() {
        return deleteInviteUser;
    }

    public void setDeleteInviteUser(String deleteInviteUser) {
        this.deleteInviteUser = deleteInviteUser;
    }

    public Date getDeleteInviteDate() {
        return deleteInviteDate;
    }

    public void setDeleteInviteDate(Date deleteInviteDate) {
        this.deleteInviteDate = deleteInviteDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "HouseOwner{" +
        ", id=" + id +
        ", name=" + name +
        ", phone=" + phone +
        ", sex=" + sex +
        ", cardNumber=" + cardNumber +
        ", filePath=" + filePath +
        ", address=" + address +
        ", leaseDateStart=" + leaseDateStart +
        ", houseId=" + houseId +
        ", delFlag=" + delFlag +
        ", imgPath=" + imgPath +
        ", relation=" + relation +
        ", leaseDateEnd=" + leaseDateEnd +
        ", leasePersonNumber=" + leasePersonNumber +
        "}";
    }
}
